package com.ibeeking.found.content.service.common.constants.enums;

/**
 * @Author ibeeking
 * @Date: 2021-01-05 19:15
 * @Description: 报名状态
 */
public enum BroadcastGoodsPriceTypeEnum {
    //价格类型，1：一口价 2：价格区间 3：显示折扣价
    PRICE_TYPE_FIXED(1, "一口价"),

    PRICE_TYPE_SECTION(2, "价格区间"),

    PRICE_TYPE_DISCOUNT(2, "折扣价"),

    ;

    private Integer value;
    private String name;

    BroadcastGoodsPriceTypeEnum(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public Integer getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public static BroadcastGoodsPriceTypeEnum getEnum(Integer value) {
        for (BroadcastGoodsPriceTypeEnum enumObj : values()) {
            if (enumObj.getValue().equals(value)) {
                return enumObj;
            }
        }
        return null;
    }
    public static String getNameByValue(Integer value) {
        for (BroadcastGoodsPriceTypeEnum enumObj : values()) {
            if (enumObj.getValue().equals(value)) {
                return enumObj.getName();
            }
        }
        return null;
    }
}
